<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta charset="utf-8">
    <title>火山小视频</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">

    <script>
        var ctx = "${ctx}";
      </script>
</head>
<body >

    <center>
        <h1>火山小视频登陆</h1>
            <h1>用户：</h1><input type="text" id="name"><br>
            <h1>密码：</h1><input type="text" id = "mima"><br>

          <input type="button" value="提交" id="tijiao"  >
        <h1 id="nei"></h1>
   </center>


    <script type="text/javascript" src="<%=basePath%>js/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
    $(function () {
        $("#tijiao").click(function () {
            var a = $("#name").val();
            var  b = $("#mima").val();
         $.ajax({
                url:"sys/cha",
                type:"POST",
                data:{name:a,pwd:b},
             success:function(data){
              alert("欢迎登陆")
                 parent.location.href ='my.jsp';
             },

         error:function (data) {
                  alert("s失败");
                }
            })
        })

    })

</script>

</body>
</html>